package com.woniu.cloud;

import com.woniu.cloud.common.dto.Result;
import com.woniu.cloud.form.InsertCommentForm;
import com.woniu.cloud.form.SelectCommentForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "comment",contextId = "CommentApi")
public interface CommentApi {

    /***
     * 新增评论
     * @param StoreReviews 评论表前端传参数据对象
     * @return data为success/fail
     */
    @PostMapping("insertStoreReviews")
    Result insertStoreReviews(@RequestBody InsertCommentForm StoreReviews);

    /***
     * 通过selectCommentForm参数条件查看评论
     * @param selectCommentForm
     * @return page
     */
    @PostMapping("getStoreReviewsByStoreReviewsStoreId")
    Result getStoreReviewsByStoreReviewsStoreId(@RequestBody SelectCommentForm selectCommentForm);


    /***
     * 删除评论
     * @param storeReviewsId 评论表评论ID
     * @return
     */
    @DeleteMapping("deleteStoreReviewsByStoreReviewsId")
    Result deleteStoreReviewsByStoreReviewsId(@RequestParam("storeReviewsId")Integer storeReviewsId);




}
